from pydub import AudioSegment
from urllib import request,parse
from urllib import response
import json


audio_data = AudioSegment.from_file('./test/0.wav')

# pre_10_audio = audio_data[:1*1000]
# body_len = pre_10_audio.raw_data.__len__()
# body_content = pre_10_audio.raw_data
print(audio_data.frame_rate)

#POST DATA
# url = r" http://api.hivoice.cn/USCService/WebApi?appkey=zspwffwkpaapth6ykrval4aa26itejpbbahjufia&userid=955&id=123"
# header = """
# """
# post_data = parse.urlencode(body_content).encode('utf-8')

# request_ok = request.Request(url,post_data)
# response_read = request.urlopen(request_ok).read().decode('utf-8')
# response_json = json.loads(response_read)
# print(response_json['data']['remark'])
